<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>骡窝窝系统管理平台</title>
    <#include "../common/header.ftl"/>

    <script type="text/javascript">
        $(function () {
            $("#query").click(function () {
                $("#currentPage").val();
                $("#searchForm").submit();
            });
        })
    </script>
</head>

<body>
<div class="container">
<#include "../common/top.ftl"/>
    <div class="row">
        <div class="col-sm-3">
		<#assign currentMenu = "wish" />
				<#include "../common/menu.ftl" />
        </div>
        <div class="col-sm-9">
            <div class="page-header">
                <h3>心愿管理</h3>
            </div>
            <div class="row">
                <!-- 提交分页的表单 -->
                <form id="searchForm" class="form-inline" method="post" action="/wish/list.do">
                    <input type="hidden" name="currentPage" id="currentPage" value="1"/>
                    <div class="form-group">
                    </div>
                    <div class="form-group">
                        <label>用户查询</label>
                        <select class="c-select form-control" name="userId" id="strategies" >
                                    <option value="-1">全部</option>
                                <#list user as u>
                                    <option value="${u.id}">${u.nickName}</option>
                                </#list>
                        </select>
                    </div>
                    <div class="form-group">
                        <button id="query" type="button" class="btn btn-success"><i class="icon-search"></i> 查询</button>
                    </div>
                <script>
                    $("#strategies option[value='${(qo.userId)!}']").prop('selected',true);
                </script>
                </form>
            </div>
            <div class="row">
                <table class="table">
                    <thead>
                    <tr>
                        <th>编号</th>
                        <th>用户名</th>
                        <th>标题</th>
                        <th>内容</th>
                        <th>计划时间</th>
                        <th>发布时间</th>
                    </tr>
                    </thead>
                    <tbody>
					<#list pageInfo.list as vo>
                    <tr>
                        <td>${vo_index+1}</td>
                        <td>${vo.user.nickName!""}</td>
                        <td>${vo.title}</td>
                        <td>${vo.content}</td>
                        <td>${(vo.plaTime?string("yyyy-MM-dd"))!""}</td>
                        <td>${(vo.relTime?string("yyyy-MM-dd HH:mm:ss"))!""}</td>
                    </tr>
					</#list>
                    </tbody>
                </table>


                 <#include "../common/page.ftl"/>
            </div>
        </div>
    </div>
</div>
<style>
    #showModal img{
        width:100%
    }
    #showModal  .modal-body{
        max-height: 600px;
        overflow-y: auto;
    }

</style>
</body>
</html>